Optimal. Leaf size=91 \[ \frac {3 \text {ArcTan}(\sinh (c+d x))}{8 a d}-\frac {i}{8 d (a-i a \sinh (c+d x))}+\frac {i a}{8 d (a+i a \sinh (c+d x))^2}+\frac {i}{4 d (a+i a \sinh (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2746, 46, 212}
\begin {gather*} \frac {3 \text {ArcTan}(\sinh (c+d x))}{8 a d}+\frac {i a}{8 d (a+i a \sinh (c+d x))^2}-\frac {i}{8 d (a-i a \sinh (c+d x))}+\frac {i}{4 d (a+i a \sinh (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 212
Rule 2746
Rubi steps
\begin {align*} \int \frac {\text {sech}^3(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac {\left (i a^3\right ) \text {Subst}\left (\int \frac {1}{(a-x)^2 (a+x)^3} \, dx,x,i a \sinh (c+d x)\right )}{d}\\ &=-\frac {\left (i a^3\right ) \text {Subst}\left (\int \left (\frac {1}{8 a^3 (a-x)^2}+\frac {1}{4 a^2 (a+x)^3}+\frac {1}{4 a^3 (a+x)^2}+\frac {3}{8 a^3 \left (a^2-x^2\right )}\right ) \, dx,x,i a \sinh (c+d x)\right )}{d}\\ &=-\frac {i}{8 d (a-i a \sinh (c+d x))}+\frac {i a}{8 d (a+i a \sinh (c+d x))^2}+\frac {i}{4 d (a+i a \sinh (c+d x))}-\frac {(3 i) \text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,i a \sinh (c+d x)\right )}{8 d}\\ &=\frac {3 \tan ^{-1}(\sinh (c+d x))}{8 a d}-\frac {i}{8 d (a-i a \sinh (c+d x))}+\frac {i a}{8 d (a+i a \sinh (c+d x))^2}+\frac {i}{4 d (a+i a \sinh (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 101, normalized size = 1.11 \begin {gather*} \frac {\text {sech}^2(c+d x) \left (2-3 i \text {ArcTan}(\sinh (c+d x))+3 (-i+\text {ArcTan}(\sinh (c+d x))) \sinh (c+d x)+(3-3 i \text {ArcTan}(\sinh (c+d x))) \sinh ^2(c+d x)+3 \text {ArcTan}(\sinh (c+d x)) \sinh ^3(c+d x)\right )}{8 a d (-i+\sinh (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.55, size = 141, normalized size = 1.55
method | result | size |
risch | \(\frac {2 \,{\mathrm e}^{3 d x +3 c}+6 i {\mathrm e}^{2 d x +2 c}+3 \,{\mathrm e}^{d x +c}+3 \,{\mathrm e}^{5 d x +5 c}-6 i {\mathrm e}^{4 d x +4 c}}{4 \left ({\mathrm e}^{d x +c}+i\right )^{2} \left ({\mathrm e}^{d x +c}-i\right )^{4} d a}-\frac {3 i \ln \left ({\mathrm e}^{d x +c}-i\right )}{8 a d}+\frac {3 i \ln \left ({\mathrm e}^{d x +c}+i\right )}{8 a d}\) | \(125\) |
derivativedivides | \(\frac {\frac {i}{4 \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}+\frac {3 i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}{8}-\frac {1}{4 \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}+\frac {i}{2 \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {3 i \ln \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {3 i}{2 \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {1}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}-\frac {1}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) | \(141\) |
default | \(\frac {\frac {i}{4 \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )^{2}}+\frac {3 i \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}{8}-\frac {1}{4 \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+i\right )}+\frac {i}{2 \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}-\frac {3 i \ln \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {3 i}{2 \left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}+\frac {1}{\left (-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}-\frac {1}{-i+\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{a d}\) | \(141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 287 vs. \(2 (71) = 142\).
time = 0.43, size = 287, normalized size = 3.15 \begin {gather*} -\frac {3 \, {\left (-i \, e^{\left (6 \, d x + 6 \, c\right )} - 2 \, e^{\left (5 \, d x + 5 \, c\right )} - i \, e^{\left (4 \, d x + 4 \, c\right )} - 4 \, e^{\left (3 \, d x + 3 \, c\right )} + i \, e^{\left (2 \, d x + 2 \, c\right )} - 2 \, e^{\left (d x + c\right )} + i\right )} \log \left (e^{\left (d x + c\right )} + i\right ) + 3 \, {\left (i \, e^{\left (6 \, d x + 6 \, c\right )} + 2 \, e^{\left (5 \, d x + 5 \, c\right )} + i \, e^{\left (4 \, d x + 4 \, c\right )} + 4 \, e^{\left (3 \, d x + 3 \, c\right )} - i \, e^{\left (2 \, d x + 2 \, c\right )} + 2 \, e^{\left (d x + c\right )} - i\right )} \log \left (e^{\left (d x + c\right )} - i\right ) - 6 \, e^{\left (5 \, d x + 5 \, c\right )} + 12 i \, e^{\left (4 \, d x + 4 \, c\right )} - 4 \, e^{\left (3 \, d x + 3 \, c\right )} - 12 i \, e^{\left (2 \, d x + 2 \, c\right )} - 6 \, e^{\left (d x + c\right )}}{8 \, {\left (a d e^{\left (6 \, d x + 6 \, c\right )} - 2 i \, a d e^{\left (5 \, d x + 5 \, c\right )} + a d e^{\left (4 \, d x + 4 \, c\right )} - 4 i \, a d e^{\left (3 \, d x + 3 \, c\right )} - a d e^{\left (2 \, d x + 2 \, c\right )} - 2 i \, a d e^{\left (d x + c\right )} - a d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {i \int \frac {\operatorname {sech}^{3}{\left (c + d x \right )}}{\sinh {\left (c + d x \right )} - i}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 177 vs. \(2 (71) = 142\).
time = 0.43, size = 177, normalized size = 1.95 \begin {gather*} -\frac {-\frac {6 i \, \log \left (-i \, e^{\left (d x + c\right )} + i \, e^{\left (-d x - c\right )} + 2\right )}{a} + \frac {6 i \, \log \left (-i \, e^{\left (d x + c\right )} + i \, e^{\left (-d x - c\right )} - 2\right )}{a} - \frac {2 \, {\left (3 \, e^{\left (d x + c\right )} - 3 \, e^{\left (-d x - c\right )} + 10 i\right )}}{a {\left (i \, e^{\left (d x + c\right )} - i \, e^{\left (-d x - c\right )} - 2\right )}} + \frac {-9 i \, {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} - 52 \, e^{\left (d x + c\right )} + 52 \, e^{\left (-d x - c\right )} + 84 i}{a {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} - 2 i\right )}^{2}}}{32 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.99, size = 137, normalized size = 1.51 \begin {gather*} \frac {3\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\sqrt {a^2\,d^2}}{a\,d}\right )}{4\,\sqrt {a^2\,d^2}}+\frac {1}{2\,a\,d\,\left ({\mathrm {e}}^{c+d\,x}-\mathrm {i}\right )}+\frac {1}{4\,a\,d\,\left ({\mathrm {e}}^{c+d\,x}+1{}\mathrm {i}\right )}-\frac {1{}\mathrm {i}}{4\,a\,d\,{\left ({\mathrm {e}}^{c+d\,x}+1{}\mathrm {i}\right )}^2}-\frac {1{}\mathrm {i}}{a\,d\,{\left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )}^3}+\frac {1{}\mathrm {i}}{2\,a\,d\,{\left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )}^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________